﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace KnowlegeAssistant
{
    public class Role
    {
        private int role_id;
        private string name;
        private List<Permission> permissions = new List<Permission>();

        public Role(int role_id, string name, List<Permission> permissions)
        {
            this.role_id = role_id;
            this.name = name;
            this.permissions = permissions;
        }

        public Role(int role_id, string name)
        {
            this.role_id = role_id;
            this.name = name;
        }

        public int RoleID
        {
            get { return this.role_id; }
        }

        public string Name
        {
            get { return this.name; }
        }

        public List<Permission> Permissions
        {
            get { return this.permissions; }
            set{ this.permissions = value;}
        }

        public void Dispose()
        {
            this.permissions = null;
        }
    }
}
